home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10013 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  48 lines

  1. Path: castle.nando.net!news
  2. From: actuary@nando.net   (Bill McCarthy)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: C coding problem
  5. Date: 15 Mar 1996 06:24:35 GMT
  6. Organization: Nando.net Public Access
  7. Message-ID: <4ib2f3$hn0@castle.nando.net>
  8. References: <4ianbf$h86@solutions.solon.com>
  9. Reply-To: actuary@nando.net (Bill McCarthy)
  10. NNTP-Posting-Host: grail1112.nando.net
  11. X-Newsreader: IBM NewsReader/2 v1.2
  12.  
  13. In <4ianbf$h86@solutions.solon.com>, proctor@corp.hp.com (Stephen Proctor) writes:
  14. >
  15. >1.) The following is the compilation line and the resulting warning message,
  16. >
  17. >% c89 shell.c -o shell
  18. >cc: "shell.c", line 98: warning 608: Illegal integer-pointer 
  19. >combination in assignment.
  20. >
  21. >2.) The program is as follows,
  22. >
  23. >#include <stdio.h>
  24. >#include <ctype.h>
  25. >#include <string.h>
  26. >#include <stdlib.h>
  27. >
  28. >main(int argc, char *argv[])
  29. >{
  30. >int ii;
  31. >int option_val = 0;
  32. >/* skip lines */
  33. >for (ii=1; ii<argc; ii++) {
  34. >/* skip lines */
  35. >/* The next line is the offending line */
  36. >   if (*argv[ii] == '-') option_val = read_options;
  37. >/* skip lines */
  38. >return 0;         /* Program executed successfully */
  39. >}
  40.  
  41. You don't show the declaration for read_options.  Might
  42. it be an int pointer?
  43.  
  44. Bill McCarthy
  45. actuary@nando.net
  46. Wendell, NC  USA
  47.  
  48.